package com.dddd.blog.blogsp;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Demo {

    public static void main(String[] args) {
        Pattern patt = Pattern.compile("\\d+");
        String s = "https://www.cnblogs.com/Megasu/p/15915194.html";

        Matcher matcher = patt.matcher(s);

        if(matcher.find()){
            System.out.println(matcher.group());
        }
    }
}
